<?php
class Zend_View_Helper_Options
{
	public function options($data,$selected)
	{
		if(!$data)
			return ;
		$strList = "<option value=''>Vui lòng chọn :</option>";
		$name = "";$val ="";
		if(!isset($selected))
			$selected = "";
		foreach ($data as $row)
		{
			if($selected == $row->id)
			{
				$select = "selected";
			}
			else 
				$select = "";
			$strList .= "<option ".$select." value='$row->id'>$row->headLines</option>";
		}
		echo $strList;
	} 
} 
?>
